<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 邓攀
  Date: 2020/8/24
  Time: 9:38
  To change this template use File | Settings | File Templates.
--%>
<script src="${basePath}static/js/jquery-1.4.2.min.js"></script>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>娱乐首页</title>
    <link rel="stylesheet" type="text/css" href="static/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="static/css/shopping-mall-index.css"/>
    <script type="text/javascript" src="static/js/jquery.js"></script>
    <script type="text/javascript" src="static/js/zhonglin.js"></script>
    <script type="text/javascript" src="static/js/zhongling2.js"></script>
</head>

<body>
<!--header-->
<%@ include file="index_linkPages/header.jsp"%>

<!--栏-->
<div class="advertisement w1200">
</div>

<!--内容页面-->
<div class="shopping-content w1200">
    <div class="sp-con-info">
        <ul class="sp-info-r m-act beaut">
            <c:forEach items="${commodities}" var="commodity">
            <li style="border-bottom:0; border-right:0;">
                <div class="li-top">
                    <a href="#" class="li-top-tu"><img src="${basePath}commodityDp?method=showPic&pic=${commodity.pic}"/></a>
                    <p class="jiage"><span class="sp1">￥${commodity.price}</span></p>
                </div>
                <p class="miaoshu">${commodity.commName}</p>
                <div class="li-md">
                    <div class="md-l f-l">
                        <p class="md-l-l f-l" ap="">1</p>
                        <div class="md-l-r f-l">
                            <a href="JavaScript:;" class="md-xs" at="">∧</a>
                            <a href="JavaScript:;" class="md-xx" ab="">∨</a>
                        </div>
                        <div style="clear:both;"></div>
                    </div>
                    <div class="md-r f-l">
                        <button class="md-l-btn1">立即购买</button>
                        <button class="md-l-btn2">加入购物车</button>
                    </div>
                    <div style="clear:both;"></div>
                </div>
                <p class="pingjia">${commodity.commInform}</p>
                <p class="weike">${commodity.businessName}</p>
            </li>
            </c:forEach>
            <div style="clear:both;"></div>
        </ul>
        <!--分页-->
<%--        <div class="paging">--%>
<%--            <div class="pag-left f-l">--%>
<%--                <c:if var="isFirst" test="${pm.pn <= 1}">--%>
<%--                <a href="javascript:;" class="about left-r f-l"><</a>--%>
<%--                </c:if>--%>
<%--                <c:if test="${!isFirst}">--%>
<%--                    <a href="${basePath}commodity?method=toCanyinyule&pn=${pm.pn-1}" class="about left-r f-l"><</a>--%>
<%--                </c:if>--%>
<%--                    <ul class="left-m f-l">--%>
<%--                    <c:forEach var="i" begin="1" end="${pm.pages}" step="1">--%>
<%--                        <c:if var="isPn" test="${pm.pn==i}">--%>
<%--                            <li class="active"><a href="javascript:;">${i}</a></li>--%>
<%--                        </c:if>--%>
<%--                        <c:if test="${!isPn}">--%>
<%--                            <li><a href="${basePath}commodity?method=toCanyinyule&pn=${i}">${i}</a></li>--%>
<%--                        </c:if>--%>
<%--                    </c:forEach>--%>
<%--                    <div style="clear:both;"></div>--%>
<%--                </ul>--%>
<%--                <c:if var="isLast" test="${pm.pn >= pm.pages}">--%>
<%--                <a href="javascript:;" class="about left-l f-l">></a>--%>
<%--                </c:if>--%>
<%--                <c:if test="${!isLast}">--%>
<%--                    <a href="${basePath}commodity?method=toCanyinyule&pn=${pm.pn+1}" class="about left-l f-l">></a>--%>
<%--                </c:if>--%>
<%--                    <div style="clear:both;"></div>--%>
<%--            </div>--%>
<%--            <div class="pag-right f-l">--%>
<%--                <div class="jump-page f-l">--%>
<%--                    到第<input type="text" name="page" id="page"/>页--%>
<%--                </div>--%>
<%--                <button class="f-l" onclick="toCanyinyule()">确定</button>--%>
<%--                <div style="clear:both;"></div>--%>
<%--            </div>--%>
<%--            <div style="xclear:both;"></div>--%>
<%--        </div>--%>
        <%@ include file="_linkPages/goodspaging.jsp"%>
    </div>
</div>

<!--底部一块-->
<%@ include file="index_linkPages/footer.jsp"%>

<%@ include file="index_linkPages/right.jsp"%>



</body>
<script>
    function toCanyinyule() {
        let page = document.getElementById("page").value;
        window.location.href = "${basePath}commodityDp?method=toCanyinyule&pn="+(page>=${pm.pages}?${pm.pages}:page);
    }
</script>
</html>
